import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { DictIntIntHelper } from "./DictIntIntHelper";
import { SeqPassPointHelper } from "./SeqPassPointHelper";
import { SeqNpcHelper } from "./SeqNpcHelper";
import { SeqMapAreaHelper } from "./SeqMapAreaHelper";
import { SeqMapSharpHelper } from "./SeqMapSharpHelper";
import { EMapOwnerType } from "./EMapOwnerType";
import { ECamp } from "./ECamp";
import { EMapInstanceType } from "./EMapInstanceType";
import { SPoint } from "./SPoint";
type int = number;
//class SMapDefine
    
    export  class SMapDefine
    {
       

        public __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.mapId);
            arg1.writeString(this.name);
            arg1.writeInt(this.realWidth);
            arg1.writeInt(this.realHeight);
            arg1.writeInt(this.clientFile);
            arg1.writeString(this.serverFile);
            this.ownerType.__write(arg1);
            this.campType.__write(arg1);
            this.instanceType.__write(arg1);
            DictIntIntHelper.write(arg1, this.revivalMaps);
            arg1.writeInt(this.restrictionType);
            DictIntIntHelper.write(arg1, this.deathEvents);
            arg1.writeInt(this.rate);
            arg1.writeInt(this.weather);
            arg1.writeInt(this.backgroundMusic);
            SeqPassPointHelper.write(arg1, this.passPoints);
            SeqNpcHelper.write(arg1, this.npcs);
            SeqMapAreaHelper.write(arg1, this.areas);
            arg1.writeInt(this.fightModel);
            SeqMapSharpHelper.write(arg1, this.sharps);
            arg1.writeBool(this.subline);
            arg1.writeInt(this.needLevel);
            arg1.writeBool(this.defaultBossPoint);
            this.bossPoint.__write(arg1);
            arg1.writeBool(this.canFly);
            arg1.writeBool(this.canBattle);
            arg1.writeBool(this.isCross);
            arg1.writeBool(this.lockRate);
            arg1.writeBool(this.canCross);
            return;
        }

        public __read(arg1: SerializeStream): void
        {
            this.mapId = arg1.readInt();
            this.name = arg1.readString();
            this.realWidth = arg1.readInt();
            this.realHeight = arg1.readInt();
            this.clientFile = arg1.readInt();
            this.serverFile = arg1.readString();
            this.ownerType = EMapOwnerType.__read(arg1);
            this.campType = ECamp.__read(arg1);
            this.instanceType = EMapInstanceType.__read(arg1);
            this.revivalMaps = DictIntIntHelper.read(arg1);
            this.restrictionType = arg1.readInt();
            this.deathEvents = DictIntIntHelper.read(arg1);
            this.rate = arg1.readInt();
            this.weather = arg1.readInt();
            this.backgroundMusic = arg1.readInt();
            this.passPoints = SeqPassPointHelper.read(arg1);
            this.npcs = SeqNpcHelper.read(arg1);
            this.areas = SeqMapAreaHelper.read(arg1);
            this.fightModel = arg1.readInt();
            this.sharps = SeqMapSharpHelper.read(arg1);
            this.subline = arg1.readBool();
            this.needLevel = arg1.readInt();
            this.defaultBossPoint = arg1.readBool();
            this.bossPoint = new SPoint();
            this.bossPoint.__read(arg1);
            this.canFly = arg1.readBool();
            this.canBattle = arg1.readBool();
            this.isCross = arg1.readBool();
            this.lockRate = arg1.readBool();
            this.canCross = arg1.readBool();
            return;
        }

        public /* var */mapId: int;

        public /* var */name: string;

        public /* var */realWidth: int;

        public /* var */realHeight: int;

        public /* var */clientFile: int;

        public /* var */serverFile: string;

        public /* var */ownerType: EMapOwnerType;

        public /* var */campType: ECamp;

        public /* var */instanceType: EMapInstanceType;

        public /* var */revivalMaps: Map<any, any> /* flash.utils.Dictionary */;

        public /* var */restrictionType: int;

        public /* var */deathEvents: Map<any, any> /* flash.utils.Dictionary */;

        public /* var */rate: int;

        public /* var */weather: int;

        public /* var */backgroundMusic: int;

        public /* var */passPoints: Array<any>;

        public /* var */npcs: Array<any>;

        public /* var */areas: Array<any>;

        public /* var */fightModel: int;

        public /* var */sharps: Array<any>;

        public /* var */subline: Boolean;

        public /* var */needLevel: int;

        public /* var */defaultBossPoint: Boolean;

        public /* var */bossPoint: SPoint;

        public /* var */canFly: Boolean;

        public /* var */canBattle: Boolean;

        public /* var */isCross: Boolean;

        public /* var */lockRate: Boolean;

        public /* var */canCross: Boolean;
    }
